﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Compiler
{
    public class LexRuleSequence : LexNode
    {
        LexNode first;
        LexNode rest;

        public LexRuleSequence(LexNode first, LexNode rest)
        {
            this.first = first;
            if (!(rest is LexEmptyNode))
                this.rest = rest;
        }

        public override string ToString()
        {
            string s = first.ToString() + ";";
            if (rest != null)
                s += "\n" + rest.ToString();
            return s;
        }
    }
}
